<?php
require_once 'FModel/Framework/SystemConfig.php';
require_once 'FModel/Framework/ConnectionFactory.php';

final class AdminConnectionFactory extends ConnectionFactory {
    protected static $instance = null;

	public static function getInstance(){
		if (!self::$instance) {
			self::$instance = new self();
		}
		return self::$instance;
	}
    
	protected function loadDbConfig() {
		$path = dirname(__FILE__) . '/../../../../configs/database.php';
		$config = include(realpath($path));
        
		$this->config = $config[SystemConfig::getRunLevel()];
	}
}

